package cn.itcast.bos.quartz;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import cn.itcast.bos.service.take_delivery.PromotionService;

public class PromotionJob implements Job{

	@Autowired
	private PromotionService promotionService;
	
	
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
	//每分钟执行一次，当时间大于promotion数据表里面的enddate,说明促销活动已经结束
		promotionService.updateStatus(new Date());	
		
		
	}

}
